from django.urls import path, register_converter

from apps.goods.views import IndexView, ListView, HotGoodsView, MySearchView, DetailView, CategoryVisitCountView, \
    UserBrowseHistory
from apps.users.views import UsernameCountView, RegisterView, LoginView, LogoutView, UserInfoView, SaveEmailView, \
    EmailVerifyView, AddressCreateView, AddressView
from utils.converters import UsernameConverter

urlpatterns = [

    path('index/', IndexView.as_view()),
    path('list/<category_id>/skus/', ListView.as_view()),
    path('hot/<category_id>/', HotGoodsView.as_view()),
    # 注意这里没有as_view方法
    path('search/', MySearchView()),
    path('detail/<sku_id>/', DetailView.as_view()),
    path('detail/<sku_id>/', DetailView.as_view()),
    path('detail/visit/<cat_id>/', CategoryVisitCountView.as_view()),
    path('browse_histories/', UserBrowseHistory.as_view()),

]
